home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / GNUSUTIL.ZIP / lib / Makefile.os2 < prev    next >
Encoding:
Makefile  |  1994-12-17  |  1.8 KB  |  66 lines

  1. # Makefile for library files used by GNU shell utilities.
  2. # Do not use this makefile directly, but only from `../Makefile'.
  3. # Copyright (C) 1991 Free Software Foundation, Inc.
  4.  
  5. OBJECTS = basename$O error$O stripslash$O xmalloc$O xstrdup$O \
  6. putenv$O getopt$O getopt1$O getdate$O posixtm$O utsname$O stime$O \
  7. gethostname$O xgethostname$O xgetcwd$O strftime$O full-write$O \
  8. long-options$O getline$O group-member$O
  9. REGEX = regex$O
  10.  
  11. .SUFFIXES: .c $O
  12.  
  13. .c$O:
  14.     $(CC) $(CFLAGS) -c $<
  15.  
  16. .PHONY: lib dll
  17. lib: shu.a
  18. dll: shu.lib gnushu.dll regex.lib gnuregex.dll
  19.  
  20. shu.a: $(OBJECTS) $(REGEX)
  21.     rm -f $@
  22.     $(AR) r $@ $(OBJECTS) $(REGEX)
  23.     $(RANLIB) $@
  24.  
  25. shu.lib: gnushu.def
  26.     emximp -o $@ gnushu.def
  27.  
  28. regex.lib: gnuregex.def
  29.     emximp -o $@ gnuregex.def
  30.  
  31. gnushu.dll: gnushu.def $(OBJECTS)
  32.     $(CC) gnushu.def -o $@ $(OBJECTS) $(DLFLAGS)
  33.  
  34. gnuregex.dll: gnuregex.def $(REGEX)
  35.     $(CC) gnuregex.def -o $@ $(REGEX) $(DLFLAGS)
  36.  
  37. extract_stat = sed "s/@l@//g; s/@L@//g; /@LSTAT_ONLY@/d"
  38. extract_lstat = sed "s/@l@/l/g; s/@L@/L/g; s/    *@LSTAT_ONLY@//"
  39. stats: safe-lstat.c safe-lstat.h safe-stat.c safe-stat.h
  40. safe-lstat.c: safe-xstat.cin
  41.     $(extract_lstat) safe-xstat.cin > $@
  42. safe-lstat.h: safe-xstat.hin
  43.     $(extract_lstat) safe-xstat.hin > $@
  44. safe-stat.c: safe-xstat.cin
  45.     $(extract_stat) safe-xstat.cin > $@
  46. safe-stat.h: safe-xstat.hin
  47.     $(extract_stat) safe-xstat.hin > $@
  48. safe-stat$O: safe-stat.h
  49. safe-lstat$O: safe-lstat.h safe-stat.h
  50.  
  51. getdate.c: getdate.y
  52.     @echo expect 8 shift/reduce conflicts
  53.     bison -o getdate.c getdate.y
  54.  
  55. # Make the rename atomic, in case sed is interrupted and later rerun.
  56. posixtm.c: posixtm.y
  57.     bison -o posixtm.tab.c posixtm.y
  58.     sed -e "s/yy/zz/g" posixtm.tab.c > $@
  59.     rm -f posixtm.tab.c
  60.  
  61. getopt1$O: getopt.h
  62. regex$O: regex.h
  63.  
  64. clean:
  65.     rm -f *.o *.obj *.a *.lib *.imp
  66.